package servlets;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 
 * @author andrei costache
 *
 */
public class UserRegisterController extends UserController {

	@Override
	public void doRequest(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
            RequestDispatcher view = null;
            String submitted = request.getParameter("submit");
            if (submitted != null){
                
                //Check if a new comment has to be stored.
                //Inject the content and the comments.
                view = request.getRequestDispatcher("/jsp/UserRegister.jsp");
            } else {
                view = request.getRequestDispatcher("/jsp/UserRegister.jsp");
            }
            view.forward(request, response);
	}

}
